Skip to content

fix: exclude release scratch dirs from RAT and license skill docs#4685

Merged
andygrove merged 3 commits into
apache:mainfrom
andygrove:fix-rat-release-scratch-dirs
Jun 19, 2026
Merged

fix: exclude release scratch dirs from RAT and license skill docs#4685
andygrove merged 3 commits into
apache:mainfrom
andygrove:fix-rat-release-scratch-dirs

Conversation

@andygrove

@andygrove andygrove commented Jun 18, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #4671.

Rationale for this change

The apache-rat-plugin is bound to the Maven verify phase, so it runs on every install, including the six ./mvnw ... -DskipTests install runs in dev/release/build-release-comet.sh (-DskipTests skips tests, not RAT). RAT scans the root module's directory tree, and the exclude list did not cover several untracked generated/scratch directories that accumulate during a release (Python virtualenv, docker build workdir, extracted release tarballs, the rat report files, and the downloaded rat jar). Once populated, each RAT pass walks a very large number of files, so the build appears to hang rather than being busy.

Separately, the bash rat check (dev/release/run-rat.sh + rat_exclude_files.txt) flagged files that the Maven RAT config already skips, so the two checks were inconsistent.

What changes are included in this PR?

  • Add excludes to the apache-rat-plugin configuration in pom.xml for the release scratch paths: dev/release/venv/**, dev/release/comet-rm/workdir/**, dev/dist/**, dev/release/rat.txt, dev/release/filtered_rat.txt, and dev/release/*.jar.
  • Reconcile the bash rat exclude list (dev/release/rat_exclude_files.txt) with the Maven check by adding the native/jni-bridge/testdata/ backtrace/stacktrace fixtures (these moved from native/testdata, whose stale paths remain listed) and .github/workflows/README.md.
  • Add the standard ASF license header to the five checked-in .claude/skills/*/SKILL.md files. These ship in the release tarball (built via git archive), so rather than excluding them from the license check they are now properly licensed like every other markdown file in the repo. The header is placed after the YAML frontmatter (which must remain the first content for the skill loader to parse it); RAT still detects the header in that position.

How are these changes tested?

Built a release tarball from this branch the same way dev/release/create-tarball.sh does (git archive HEAD | gzip) and ran the real dev/release/run-rat.sh against it, which reported "No unapproved licenses". Also confirmed with the apache-rat-0.16.1 jar directly that a markdown file carrying the ASF header after YAML frontmatter is approved, while the same file without the header is not.

The apache-rat-plugin runs during the verify phase on every install,
including the six `mvnw ... install` runs in build-release-comet.sh.
RAT walks the root module tree and the exclude list did not cover
several untracked generated/scratch directories that accumulate during
a release (Python virtualenv, docker workdir, extracted tarballs, rat
report files, and the downloaded rat jar). Populated, these make each
RAT pass slow and the build appears to hang. Add excludes for those
paths to the Maven apache-rat-plugin config.

The bash rat check (run-rat.sh) flagged files that the Maven check
already skips. Reconcile the two:

- Add the jni-bridge testdata backtrace/stacktrace fixtures (which
  moved from native/testdata) and .github/workflows/README.md to the
  bash rat exclude list.
- Add the standard ASF license header to the five checked-in
  .claude/skills/*/SKILL.md files so they are properly licensed in the
  release tarball rather than excluded from the license check. The
  header is placed after the YAML frontmatter, which must stay first
  for the skill loader; RAT still detects it.
@andygrove andygrove force-pushed the fix-rat-release-scratch-dirs branch from 11ca1ad to a53d513 Compare June 18, 2026 17:44
@andygrove andygrove changed the title fix: exclude release scratch dirs from RAT and sync bash rat excludes fix: exclude release scratch dirs from RAT and license skill docs Jun 18, 2026
Comment thread dev/release/rat_exclude_files.txt Outdated

@comphead comphead left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andygrove

andygrove and others added 2 commits June 18, 2026 20:35
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
@andygrove andygrove merged commit 642e360 into apache:main Jun 19, 2026
69 checks passed
@andygrove andygrove deleted the fix-rat-release-scratch-dirs branch June 19, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RAT check in Maven build scans temporary release/scratch directories, making release builds slow

2 participants